from matplotlib import pyplot as plt

x = [1, 2, 3, 4, 5, 6, 7, 8]
y = [3, 1, 4, 5, 8, 9, 7, 2]
plt.bar(x, y, align="center")
plt.title("Bar graph")
plt.ylabel("y-axis")
plt.xlabel("x-axis")
plt.show()
